﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace webClient
{
    public enum ModuleName
    {
        PLC   = 0,
        Light = 1
    }
    public enum PLCCmd
    {
        开始,
        停止,
        复位,

        循环模式,
        背景光源启用,

        PCB板长度,
        PCB板厚度,
        上相机基准位置,
        下相机基准位置
    }
    public class ClientMsg
    {
        public List<PLCData>? PLCList { get; set; } = null;

        public List<LightData>? LightList { get; set; } = null;

    }
    public class PLCData
    {
        public string Name { get; set; } = "";

        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public float? FloatValue { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public bool? BoolValue { get; set; }
    }
    public class LightData
    {
        public string Name { get; set; } = "";
        public int Intensity { get; set; }
    }
}
